var Browser = {
  addListeners: function()
  {
    $("main-browser").addEventListener("DOMTitleChanged", Browser.domTitleChanged, false);
  },
  
  removeListeners: function()
  {
    $("main-browser").removeEventListener("DOMTitleChanged", Browser.domTitleChanged, false);
  },
  
  domTitleChanged: function(aEvent) {
    if (aEvent.target != this.contentDocument)
      return;

    document.title = aEvent.target.title;
  }
}